package com.hr.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.hr.model.PubinfoModel;
import com.hr.service.PubinfoService;

@Controller
public class MenuController {
	@Autowired
	private PubinfoService pubinfoService;
	
	@RequestMapping("/index")
	public void index(){
	}
	
	@RequestMapping("/top.html")
	public void menu_top(){}
	
	@RequestMapping("/main.html")
	public void main(){}
	
	@RequestMapping("/content.html")
	public ModelAndView content(){
		List<PubinfoModel> PubinfoModels = pubinfoService.findAll();
		ModelAndView mv = new ModelAndView("content");
		mv.addObject("PubinfoModels", PubinfoModels);
		return mv;
	}
	
	@RequestMapping("/menu.html")
	public void menu(){}
}
